package io;

import com.sun.xml.internal.ws.policy.privateutil.PolicyUtils;

import java.io.FileInputStream;
import java.io.IOException;
import java.io.InputStream;

/**
 * Created with IntelliJ IDEA.
 * Description:
 * User: Li_DaChiZi
 * Date: 2025/7/2
 * Time: 11:11
 */
public class Demo10 {
    public static void main(String[] args) {
        try (InputStream inputStream = new FileInputStream("./test.txt")){
            while (true) {
                int b = inputStream.read();
                if (b == -1) {
                    break;
                } else {
                    System.out.printf("0x%x\n",b);
                }
            }
        } catch (IOException e) {
            e.printStackTrace();
        }
    }
}
